package pod

import (
	"kms-backend/controllers/pod"

	"github.com/gin-gonic/gin"
)

// 新增
func create(podGroup *gin.RouterGroup) {
	podGroup.POST("/create", pod.Create)
}

// 更新
func update(podGroup *gin.RouterGroup) {
	podGroup.POST("/update", pod.Update)
}

func detail(podGroup *gin.RouterGroup) {
	podGroup.GET("/detail", pod.Detail)
}

func list(podGroup *gin.RouterGroup) {
	podGroup.GET("/list", pod.List)
}

func delete(podGroup *gin.RouterGroup) {
	podGroup.POST("/delete", pod.Delete)
}

func deleteList(podGroup *gin.RouterGroup) {
	podGroup.POST("/deleteList", pod.DeleteList)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	// 配置路由策略
	podGroup := g.Group("/pod")
	create(podGroup)
	update(podGroup)
	detail(podGroup)
	list(podGroup)
	delete(podGroup)
	deleteList(podGroup)

}
